
const {ccclass, property} = cc._decorator;

@ccclass
export default class TiledMapPanelScript extends cc.Component {

    @property(cc.Button)
    private closeBtn:cc.Button = null;

    // onLoad () {}

    start () {
        this.closeBtn.node.on(cc.Node.EventType.TOUCH_END,this.remove,this);
    }

    // update (dt) {}

    private remove():void
    {   
        this.closeBtn.node.off(cc.Node.EventType.TOUCH_END,this.remove,this); 
        this.node.destroy();
    }
}
